from datetime import datetime

from app.schema.base import InfoSchema, RespDetailSchema
from uuid import uuid4

class MessageInfoSchema(InfoSchema):
    user_id: int=None
    chat_id: int=0
    message_type: int=0 # 0 文字消息 1 群主信息消息, 2 ai介绍
    content: str=''
    user_type: int=0 # 0: 用户消息，1：ai回复消息
    parent_id: int=None # 上一条消息的id

class MessageDetailSchema(MessageInfoSchema):
    created_time: datetime
    updated_time: datetime

class MessageRespDetailSchema(RespDetailSchema):
    detail: MessageDetailSchema = None

class MessageCreateSchema(MessageInfoSchema):
    id: int=1
    